<?php

namespace common\models\clinic;

use Yii;

/**
 * This is the model class for table "{{%clinic_user_surplus}}".
 *
 * @property int $id
 * @property int $project_id 项目ID
 * @property string $patient_card_id 诊疗号
 * @property string $name 患者姓名
 * @property int $clinic_project_id 治疗项目ID
 * @property string $clinic_project_name 治疗项目名称（冗余）
 * @property int $total_num 正常数量
 * @property int $help_num 援助数量
 * @property int $created_at 创建时间
 * @property int $updated_at 更新时间
 */
class UserSurplus extends \common\models\BaseModel
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%clinic_user_surplus}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['project_id', 'clinic_project_id', 'total_num', 'help_num', 'created_at', 'updated_at'], 'integer'],
            [['patient_card_id'], 'string', 'max' => 50],
            [['name'], 'string', 'max' => 20],
            [['clinic_project_name'], 'string', 'max' => 120],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'project_id' => '项目ID',
            'patient_card_id' => '诊疗号',
            'name' => '患者姓名',
            'clinic_project_id' => '治疗项目ID',
            'clinic_project_name' => '治疗项目名称（冗余）',
            'total_num' => '正常数量',
            'help_num' => '援助数量',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }
}
